@extends('admin.common.admin_main')
@section('container')
    @include('UEditor::head')
<div class="uc-body">
    <div class="uc-head">
        <ul>
            <li><span>新增设备</span></li>
        </ul>
    </div>
    <div class="form form-horizontal">
        <div class="form-body">
            <div class="row">
                <div class="label"><span class="require">*</span>设备名称：</div>
                <div class="control-text">
                    <input id="device_name" class="form-control form-control-lg" type="text">
                </div>
            </div>
            <div class="row">
                <div class="label"><span class="require">*</span>设备类别：</div>
                <div class="control-text">
                    <select id="type_id" class="form-control">
                        <option value="">请选择</option>
                        @forelse ($device_type_list as $key=>$value)
                            <option value="{{$value['id']}}">{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="label"><span class="require">*</span>设备品牌：</div>
                <div class="control-text">
                    <select id="brand_id" class="form-control">
                        <option value="">请选择</option>
                        @forelse ($brand_type_list as $key=>$value)
                            <option value="{{$value['id']}}">{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="label"><span class="require">*</span>设备图片：</div>
                <div class="control-text j_fileUpload">
                    <div class="file_list">
                        <ul class="j_fileList">

                        </ul>
                    </div>
                    <div class="file_select">
                        <div class="form-control-static">
                            <a class="btn btn-small btn-primary">浏览</a>
                            <input id="fileUpload" class="txt_file j_fileSelect" data-multi="true" name="files" type="file">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="label"><span class="require">*</span>设备介绍：</div>
                <div class="control-text">
                    <script id="device_desc" name="content" type="text/plain"></script>
                </div>
            </div>
            <div class="row">
                <div class="label">&nbsp;</div>
                <div class="control-text">
                    <a class="btn btn-warning j_deviceSave" data-chk="1">保存</a>
                    <a class="btn btn-primary j_deviceSave" data-chk="2">保存并提交审核</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('script')
<script src="{{env('STATIC_PATH')}}/libs/ajaxfileupload.js"></script>
<script src="{{env('STATIC_PATH')}}/js/user_device.js"></script>
@endsection
